<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN\" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="arq" uri="/tld/arquitectura.tld" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net/el" %>
<%@ taglib prefix="dynamic" uri="/tld/dynamic.tld" %>

<html>
<head>
<jsp:include page="Head.jsp"/>

<!--Round the menu tabs-->
<script type="text/javascript">
    window.onload = function()
    {
        Nifty("ul#nav a", "small transparent top");
        document.getElementById('youTubeUsername').focus();
        checkBrowser();
    }

    <arq:validateFields>
        <arq:fieldValidation validationType="required" fieldId="youTubeUsername" fieldAlias="<b><i>You Tube Username</i></b>" maxLenght="50"  />
        <arq:fieldValidation validationType="required" fieldId="youTubePassword" fieldAlias="<b><i>You Tube Password</i></b>" maxLenght="50" />
    </arq:validateFields>

    function checkVideoStatus()
    {
        if( validateFields() )
        {
            document.forms[0].submit();
        }
    }

</script>



</head>
<body>
<c:set var="currentPage" value="" scope="request" />
<jsp:include page="Menu.jsp"/>

<br><br><br><br><br><br>
<table align="center" width="50%">
    <tr align="center">
        <td align="center">
            <h2>Checking the state of video <i><b style="color:#666;"><c:out value="${command.videoProcess.title}"/></b></i></h2>
        </td>
    </tr>
    <tr>
        <td align="center">
            We need you atenticate into You Tube to check the state of the video.
        </td>
    </tr>
    <tr>
        <td align="center">
            Mind that you must log in with the same user that upload the video
        </td>
    </tr>
</table>
<br/><br/><br/><br/>

<form:form action="checkVideoState.htm" method="post" onsubmit="return validateFields()">
    <form:hidden path="videoProcess.id" />
    <form:hidden path="videoProcess.youTubeId" />

    <table align="center" width="50%">
        <tr align="center">
            <td align="right" class="textLogin" style="font-style:italic;">YouTube Username *</td>
            <td align="left">
                <form:errors path="youTubeUsername" cssClass="campoError"/>
                <form:input path="youTubeUsername" cssClass="inputClass" size="40" cssErrorClass="inputError"/>
            </td>
        </tr>
        <tr align="center">
            <td align="right" class="textLogin" style="font-style:italic;">YouTube Password *</td>
            <td align="left">
                <form:errors path="youTubePassword" cssClass="campoError"/>
                <form:password path="youTubePassword" cssClass="inputClass" size="40" cssErrorClass="inputError"/>
            </td>
        </tr>
    </table>
    <table align="center" width="50%">
        <tr align="center">
            <td>
                <span>* This user/password will not be stored in any database or persist in any way, will be used only to log you into YouTube</span>
            </td>
        </tr>
    </table>
    <br/><br/>
    <table align="center" width="50%">
        <tr align="center">
            <td align="center">
                <dynamic:flashButton text="Submit" link="checkVideoStatus()" width="300" height="60" color="blue" />
            </td>
        </tr>
    </table>

    <input type="submit" style="visibility:hidden;" name="hiddenSubmit" value="Submit" />

</form:form>


</body>
</html>